package org.itnerd.secondkill.dao;

import org.apache.ibatis.annotations.Param;
import org.itnerd.secondkill.entity.SuccessKilled;

/** 
 * @ClassName: SuccessKilledDao 
 * @Description: 秒杀成功商品明细
 * @author zwh
 * @version V1.0 
 */
public interface SuccessKilledDao {
	/**
     * 插入购买明细,可过滤重复
     * @param seckillId
     * @param userPhone
     * @return插入的行数
     */
    int insertSuccessKilled(@Param("seckillId")long seckillId, @Param("userPhone")long userPhone);


    /**
     * 根据秒杀商品的id查询明细SuccessKilled对象(该对象携带了Seckill秒杀产品对象)
     * @param seckillId
     * @return
     */
    SuccessKilled queryByIdWithSeckill(@Param("seckillId")long seckillId, @Param("userPhone")long userPhone);
}
